import React, { Component } from 'react'
import "./Header.less"
export default class Header extends Component {
  render() {
   
    let {back,register,title}=this.props
    return (
      <div className='header'>
        {back?  <div className='back' onClick={()=>{
         
          this.props.history.go(-1)
        }}>返回</div>:null}
         {title?  <div  className='text'>{title}</div>:null}
        {register?   <div  className='register' onClick={()=>{
        
          this.props.history.push("register")
        }}>注册 </div>: null}
        

      </div>
    )
  }
}
